import React, { PropTypes } from 'react';
import CardOne from '../../components/cardOne';
import './index.scss';


export default class styleOne extends React.Component {
    static defaultProps = {
        cardConfig:[{
            key:1,
             photo: "1.jpg",
            title: "我的自画像 ",
            position: '惠州',
            content: '这是在海边的情景',
            time: '2016-16-17',
            like: '76'
        },{
            key:2,
             photo: "2.jpg",
            title: "我的自画像 ",
            position: '惠州',
            content: '这是在海边的情景再见青春美丽的姑娘飒飒大苏打啊大苏打大啊是大大的啊是大大的啊实打实大大啊实打实大大啊是大大的啊是大大',
            time: '2016-16-17',
            like: '76'
        },{
            key:3,
             photo: "3.jpg",
            title: "我的自画像 ",
            position: '惠州',
            content: '这是在海边的情景',
            time: '2016-16-17',
            like: '76'
        },{
            key:3,
             photo: "4.jpg",
            title: "我的自画像 ",
            position: '惠州',
            content: '这是在海边的情景',
            time: '2016-16-17',
            like: '76'
        },{
            key:3,
             photo: "5.jpg",
            title: "我的自画像 ",
            position: '惠州',
            content: '这是在海边的情景',
            time: '2016-16-17',
            like: '76'
        }]
    }
    static PropTypes = {
        cardConfig: PropTypes.array,
    }
    constructor(props) {
        super(props);
        this.state = {
            cardConfig:props.cardConfig,
        }
    }

    render() {
        const {
            cardConfig,
        } = this.props;
        return(
            <div className="styleOne">
            
                <div className="ui link cards">
                    {
                        this.state.cardConfig.map((item, key) => {
                            return(
                                <CardOne
                                    key= {key}
                                    photo= {item.photo}
                                    title= {item.title}
                                    position= {item.position}
                                    content= {item.content}
                                    time= {item.time}
                                    like= {item.like}
                                />
                            )
                        })
                    }
                </div>
            </div>
        )
    }
}